import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'

import HomeView from '../views/HeaderNav.vue'

Vue.use(VueRouter)

const routes: Array<RouteConfig> = [
  {
    path : '/showimg',
    component : () => import('../views/showImg.vue')
  },
  {
    path : '/index',
    name : '首页',
    component : HomeView,
  },
  {
    path : '/index/scenicspot',
    name : 'scenicspot',
    component : ()=> import('../views/ScenicSpot.vue')
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
